table.MOVE Function

Syntax

Current_Record as N = table.Move(N NumberOfRecords )

Arguments

Current_Record

The physical record number of the target record.

NumberOfRecords

The number of records to move, either forward or backward. Regardless of the size of the number, the pointer will not move before the first or after the last record.

Description

Moves forward or backwards the specified NumberOfRecords in the current sort order. Returns the record number of the target record.

Discussion

The <TBL>.MOVE() method moves the record pointer forward or backwards (in the current sort order) a specified number of records. Number_Of_Records can be positive or negative.

Example

t = table.open("customer")
t.index_primary_put("")
? t.recno()
= 1.000000
? t.move(2)
= 3.000000
? t.move(-1)
= 2.000000
? t.move(22222) 'moves to the end of the table
= 78.000000
t.index_primary_put("Lastname")
t.fetch_first()
? t.recno()
= 61.000000
? t.LogicalRecord_Get()
= 1.000000
? t.move(4)
= 65.000000
? t.LogicalRecord_Get()
= 5.000000

See Also